﻿<%@ Control Language="C#" %>

<%@ Register Assembly="Antu.WebControls" Namespace="Antu.WebControls" TagPrefix="CBW" %>
<form name="aspnetForm" method="post" action="<%= Antu.Core.Components.SiteSettings.DefaultSiteSettings.ThemeBaseMapPath %>zhengshou/OfficeFlow/WorkFlowAfterSubmit.aspx?iid=<%=Request["iid"] %>&wiid=<%=Request["wiid"] %>&ctlid=<%=Request["ctlid"] %>" id="aspnetForm">
    <script type="text/javascript">
        $(function () {
            $(".showroleuser").css({ display: "none" });
            $("#flows").click();
            checkflowuser($("#flows")[0]);
        })
        function checkflowuser(rad) {
            if ($(rad)[0].type == "checkbox") {/*多流向*/                
                if ($(rad)[0].checked) {
                    $(rad).parent().parent().find(".showroleuser").css({ display: "block" });
                } else {
                    $(rad).parent().parent().find(".showroleuser").css({ display: "none" });
                }
            } else {/*单流向*/
                $(":checkbox").each(function (i) {
                    this.checked = false;
                });
                $(":radio").not($(rad)[0]).each(function (i) {
                    this.checked = false;
                });

                $(".showroleuser").css({ display: "none" });
                $(rad).parent().parent().find(".showroleuser").css({ display: "block" });
            }
        }
        function checkroleuser(rad) {
            var ischeck = false;
            if ($(rad)[0].checked) {
                ischeck = true;
            }
            $(rad).parent().next().find("INPUT").each(function (i) {
                this.checked = ischeck;
            });
        }
        function checksubmit() {
            return true;
        }
    </script>

    <table class="gridtable">
        <tr>
            <th style="width: 5%">&nbsp;</th>
            <th style="width: 25%">流向名称</th>
            <th style="width: 70%">接收人</th>
        </tr>
        <CBW:MPRepeater ID="FlowMPRepeater" runat="server">
            <ItemTemplate>
                <tr>
                    <td>
                        <asp:PlaceHolder ID="flowradioPanel" runat="server"></asp:PlaceHolder>
                    </td>
                    <td><%#Eval("Fname") %></td>
                    <td>
                        <CBW:MPRepeater ID="RoleMPRepeater" runat="server">
                            <ItemTemplate>
                                <table class="gridtable showroleuser" style="border:#74a4c0 0px solid;">
                                    <tr>
                                        <td style="width: 30%; text-align: left;border-top-width:0px;border-bottom-width:0px; border-left-width:0px;">
                                            <asp:PlaceHolder ID="roleckPanel" runat="server"></asp:PlaceHolder>
                                        </td>
                                        <td style="width: 70%; text-align: left;border-top-width:0px;border-bottom-width:0px; border-right-width:0px;">
                                            <CBW:MPRepeater ID="UserMPRepeater" runat="server">
                                                <ItemTemplate>
                                                    <asp:PlaceHolder ID="userckPanel" runat="server"></asp:PlaceHolder>
                                                </ItemTemplate>
                                            </CBW:MPRepeater>
                                        </td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </CBW:MPRepeater>
                    </td>
                </tr>
            </ItemTemplate>
        </CBW:MPRepeater>
        <tr>
            <td colspan="3" style="text-align: center">
                <input id="submit" type="submit" value=" 提交 " onclick="return checksubmit();" />
                &nbsp;
            <input id="close" type="button" value=" 关闭 " onclick="javascript: window.parent.closeDialog();" />
            </td>
        </tr>
    </table>

</form>
